<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Simple Test Website</title>
  </head>
  <body>
    <h1>Sections</h1>
    <div><div id="zig"><h1><a class="" href="#zig">Zig Code</a></h1><pre><code class="zig"><span class="keyword">const</span> <span class="constant variable_builtin type variable">Sample</span> <span class="operator">=</span> <span class="keyword_type">struct</span> <span class="punctuation_bracket">{</span>
    <span class="constant variable_builtin type variable_member variable">a</span><span class="punctuation_delimiter">:</span> <span class="type_builtin">i32</span><span class="punctuation_delimiter">,</span>
    <span class="constant variable_builtin type variable_member variable">b</span><span class="punctuation_delimiter">:</span> <span class="type_builtin">i32</span><span class="punctuation_delimiter">,</span>
<span class="punctuation_bracket">}</span><span class="punctuation_delimiter">;</span>

<span class="keyword_modifier">pub</span> <span class="keyword_modifier">extern</span> <span class="string">&quot;sampleLibrary&quot;</span> <span class="keyword_function">fn</span> <span class="constant variable_builtin type variable function">SampleFunction</span><span class="punctuation_bracket">(</span>
    <span class="constant variable_builtin variable_parameter variable type">arg1</span><span class="punctuation_delimiter">:</span> <span class="type_builtin">i32</span><span class="punctuation_delimiter">,</span>
    <span class="constant variable_builtin variable_parameter variable type">arg2</span><span class="punctuation_delimiter">:</span> <span class="operator">*</span><span class="constant variable_builtin type variable">Sample</span><span class="punctuation_delimiter">,</span>
<span class="punctuation_bracket">)</span> <span class="keyword_modifier">callconv</span><span class="punctuation_bracket">(</span><span class="variable_builtin constant type variable">WINAPI</span><span class="punctuation_bracket">)</span> <span class="constant variable_builtin type variable">BOOL</span><span class="punctuation_delimiter">;</span>

<span class="keyword_modifier">pub</span> <span class="keyword_modifier">inline</span> <span class="keyword_function">fn</span> <span class="constant variable_builtin type variable function">main</span><span class="punctuation_bracket">(</span><span class="punctuation_bracket">)</span> <span class="type_builtin">anyerror</span><span class="operator">!</span><span class="type_builtin">void</span> <span class="punctuation_bracket">{</span>
    <span class="keyword">var</span> <span class="constant variable_builtin type variable">sample</span> <span class="operator">=</span> <span class="constant variable_builtin type variable">Sample</span><span class="punctuation_bracket">{</span> <span class="punctuation_delimiter">.</span><span class="constant variable_builtin type variable_member variable">a</span> <span class="operator">=</span> <span class="number">1</span><span class="punctuation_delimiter">,</span> <span class="punctuation_delimiter">.</span><span class="constant variable_builtin type variable_member variable">b</span> <span class="operator">=</span> <span class="number">2</span> <span class="punctuation_bracket">}</span><span class="punctuation_delimiter">;</span>
    <span class="constant variable_builtin function_call variable type">SampleFunction</span><span class="punctuation_bracket">(</span><span class="number">1</span><span class="punctuation_delimiter">,</span> <span class="operator">&amp;</span><span class="constant variable_builtin type variable">sample</span><span class="punctuation_bracket">)</span><span class="punctuation_delimiter">;</span>
<span class="punctuation_bracket">}</span>
</code></pre>
</div><div id="rust"><h1><a class="" href="#rust">Rust Code</a></h1><pre><code class="rust"><span class="attribute">#</span><span class="punctuation_bracket attribute">[</span><span class="constructor constant attribute">derive</span><span class="punctuation_bracket attribute">(</span><span class="constructor constant attribute">Debug</span><span class="punctuation_delimiter attribute">,</span><span class="attribute"> </span><span class="constructor constant attribute">Clone</span><span class="punctuation_delimiter attribute">,</span><span class="attribute"> </span><span class="constructor constant attribute">PartialEq</span><span class="punctuation_bracket attribute">)</span><span class="punctuation_bracket attribute">]</span>
<span class="keyword">pub</span> <span class="keyword">struct</span> <span class="type">ComplexData</span><span class="punctuation_bracket">&lt;</span><span class="operator">&apos;</span><span class="constructor constant label">a</span><span class="punctuation_delimiter">,</span> <span class="type">T</span><span class="punctuation_delimiter">:</span> <span class="operator">&apos;</span><span class="constructor constant label">a</span> + <span class="type">Display</span><span class="punctuation_bracket">&gt;</span> <span class="punctuation_bracket">{</span>
    <span class="attribute">#</span><span class="punctuation_bracket attribute">[</span><span class="constructor constant attribute">serde</span><span class="punctuation_bracket attribute">(</span><span class="constructor constant attribute">rename</span><span class="attribute"> = </span><span class="string attribute">&quot;identifier&quot;</span><span class="punctuation_bracket attribute">)</span><span class="punctuation_bracket attribute">]</span>
    <span class="property">id</span><span class="punctuation_delimiter">:</span> <span class="operator">&amp;</span><span class="operator">&apos;</span><span class="constructor constant label">a</span> <span class="type_builtin">str</span><span class="punctuation_delimiter">,</span>
    <span class="attribute">#</span><span class="punctuation_bracket attribute">[</span><span class="constructor constant attribute">serde</span><span class="punctuation_bracket attribute">(</span><span class="constructor constant attribute">skip_serializing_if</span><span class="attribute"> = </span><span class="string attribute">&quot;Option::is_none&quot;</span><span class="punctuation_bracket attribute">)</span><span class="punctuation_bracket attribute">]</span>
    <span class="property">metadata</span><span class="punctuation_delimiter">:</span> <span class="type">Option</span><span class="punctuation_bracket">&lt;</span><span class="type">HashMap</span><span class="punctuation_bracket">&lt;</span><span class="type">String</span><span class="punctuation_delimiter">,</span> <span class="type">T</span><span class="punctuation_bracket">&gt;</span><span class="punctuation_bracket">&gt;</span><span class="punctuation_delimiter">,</span>
    <span class="attribute">#</span><span class="punctuation_bracket attribute">[</span><span class="constructor constant attribute">serde</span><span class="punctuation_bracket attribute">(</span><span class="keyword attribute">default</span><span class="punctuation_bracket attribute">)</span><span class="punctuation_bracket attribute">]</span>
    <span class="property">references</span><span class="punctuation_delimiter">:</span> <span class="type">Vec</span><span class="punctuation_bracket">&lt;</span><span class="operator">&amp;</span><span class="operator">&apos;</span><span class="constructor constant label">a</span> <span class="type">RefCell</span><span class="punctuation_bracket">&lt;</span><span class="type">T</span><span class="punctuation_bracket">&gt;</span><span class="punctuation_bracket">&gt;</span><span class="punctuation_delimiter">,</span>
    <span class="property">timestamp</span><span class="punctuation_delimiter">:</span> <span class="type">SystemTime</span><span class="punctuation_delimiter">,</span>
    <span class="property">data</span><span class="punctuation_delimiter">:</span> <span class="type">Box</span><span class="punctuation_bracket">&lt;</span><span class="keyword">dyn</span> <span class="type">Iterator</span><span class="punctuation_bracket">&lt;</span><span class="type">Item</span> = <span class="type">T</span><span class="punctuation_bracket">&gt;</span> + <span class="operator">&apos;</span><span class="constructor constant label">a</span><span class="punctuation_bracket">&gt;</span><span class="punctuation_delimiter">,</span>
<span class="punctuation_bracket">}</span>

<span class="keyword">impl</span><span class="punctuation_bracket">&lt;</span><span class="operator">&apos;</span><span class="constructor constant label">a</span><span class="punctuation_delimiter">,</span> <span class="type">T</span><span class="punctuation_delimiter">:</span> <span class="type">Display</span><span class="punctuation_bracket">&gt;</span> <span class="type">ComplexData</span><span class="punctuation_bracket">&lt;</span><span class="operator">&apos;</span><span class="constructor constant label">a</span><span class="punctuation_delimiter">,</span> <span class="type">T</span><span class="punctuation_bracket">&gt;</span> <span class="punctuation_bracket">{</span>
    <span class="keyword">pub</span> <span class="keyword">fn</span> <span class="constructor constant function">new</span><span class="punctuation_bracket">(</span><span class="constructor constant variable_parameter">id</span><span class="punctuation_delimiter">:</span> <span class="operator">&amp;</span><span class="operator">&apos;</span><span class="constructor constant label">a</span> <span class="type_builtin">str</span><span class="punctuation_bracket">)</span> -&gt; <span class="type">Result</span><span class="punctuation_bracket">&lt;</span><span class="type">Self</span><span class="punctuation_delimiter">,</span> <span class="type">Box</span><span class="punctuation_bracket">&lt;</span><span class="keyword">dyn</span> <span class="type">Error</span> + <span class="operator">&apos;</span><span class="constructor constant label">a</span><span class="punctuation_bracket">&gt;</span><span class="punctuation_bracket">&gt;</span> <span class="punctuation_bracket">{</span>
        <span class="constructor constant function">Ok</span><span class="punctuation_bracket">(</span><span class="type">Self</span> <span class="punctuation_bracket">{</span>
            <span class="constructor constant">id</span><span class="punctuation_delimiter">,</span>
            <span class="property">metadata</span><span class="punctuation_delimiter">:</span> <span class="constructor constant">None</span><span class="punctuation_delimiter">,</span>
            <span class="property">references</span><span class="punctuation_delimiter">:</span> <span class="constructor constant type">Vec</span><span class="punctuation_delimiter">::</span><span class="constructor constant function">new</span><span class="punctuation_bracket">(</span><span class="punctuation_bracket">)</span><span class="punctuation_delimiter">,</span>
            <span class="property">timestamp</span><span class="punctuation_delimiter">:</span> <span class="constructor constant type">SystemTime</span><span class="punctuation_delimiter">::</span><span class="constructor constant function">now</span><span class="punctuation_bracket">(</span><span class="punctuation_bracket">)</span><span class="punctuation_delimiter">,</span>
            <span class="property">data</span><span class="punctuation_delimiter">:</span> <span class="constructor constant type">Box</span><span class="punctuation_delimiter">::</span><span class="constructor constant function">new</span><span class="punctuation_bracket">(</span><span class="constructor constant type">std</span><span class="punctuation_delimiter">::</span><span class="constructor constant type">iter</span><span class="punctuation_delimiter">::</span><span class="constructor constant function">empty</span><span class="punctuation_bracket">(</span><span class="punctuation_bracket">)</span><span class="punctuation_bracket">)</span><span class="punctuation_delimiter">,</span>
        <span class="punctuation_bracket">}</span><span class="punctuation_bracket">)</span>
    <span class="punctuation_bracket">}</span>
<span class="punctuation_bracket">}</span>
</code></pre>
</div></div>
  </body>
</html>